{"ast":null,"code":"import { presetPrimaryColors } from '@ant-design/colors';\nimport warning from '../_util/warning';\nexport function validProgress(progress) {\n  if (!progress || progress < 0) {\n    return 0;\n  }\n  if (progress > 100) {\n    return 100;\n  }\n  return progress;\n}\nexport function getSuccessPercent(_ref) {\n  var success = _ref.success,\n    successPercent = _ref.successPercent;\n  var percent = successPercent;\n  /** @deprecated Use `percent` instead */\n  if (success && 'progress' in success) {\n    process.env.NODE_ENV !== \"production\" ? warning(false, 'Progress', '`success.progress` is deprecated. Please use `success.percent` instead.') : void 0;\n    percent = success.progress;\n  }\n  if (success && 'percent' in success) {\n    percent = success.percent;\n  }\n  return percent;\n}\nexport var getPercentage = function getPercentage(_ref2) {\n  var percent = _ref2.percent,\n    success = _ref2.success,\n    successPercent = _ref2.successPercent;\n  var realSuccessPercent = validProgress(getSuccessPercent({\n    success: success,\n    successPercent: successPercent\n  }));\n  return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];\n};\nexport var getStrokeColor = function getStrokeColor(_ref3) {\n  var _ref3$success = _ref3.success,\n    success = _ref3$success === void 0 ? {} : _ref3$success,\n    strokeColor = _ref3.strokeColor;\n  var successColor = success.strokeColor;\n  return [successColor || presetPrimaryColors.green, strokeColor || null];\n};","map":{"version":3,"names":["presetPrimaryColors","warning","validProgress","progress","getSuccessPercent","_ref","success","successPercent","percent","process","env","NODE_ENV","getPercentage","_ref2","realSuccessPercent","getStrokeColor","_ref3","strokeColor","successColor","green"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/progress/utils.js"],"sourcesContent":["import { presetPrimaryColors } from '@ant-design/colors';\nimport warning from '../_util/warning';\nexport function validProgress(progress) {\n  if (!progress || progress < 0) {\n    return 0;\n  }\n  if (progress > 100) {\n    return 100;\n  }\n  return progress;\n}\nexport function getSuccessPercent(_ref) {\n  let {\n    success,\n    successPercent\n  } = _ref;\n  let percent = successPercent;\n  /** @deprecated Use `percent` instead */\n  if (success && 'progress' in success) {\n    process.env.NODE_ENV !== \"production\" ? warning(false, 'Progress', '`success.progress` is deprecated. Please use `success.percent` instead.') : void 0;\n    percent = success.progress;\n  }\n  if (success && 'percent' in success) {\n    percent = success.percent;\n  }\n  return percent;\n}\nexport const getPercentage = _ref2 => {\n  let {\n    percent,\n    success,\n    successPercent\n  } = _ref2;\n  const realSuccessPercent = validProgress(getSuccessPercent({\n    success,\n    successPercent\n  }));\n  return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];\n};\nexport const getStrokeColor = _ref3 => {\n  let {\n    success = {},\n    strokeColor\n  } = _ref3;\n  const {\n    strokeColor: successColor\n  } = success;\n  return [successColor || presetPrimaryColors.green, strokeColor || null];\n};"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,oBAAoB;AACxD,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAO,SAASC,aAAa,CAACC,QAAQ,EAAE;EACtC,IAAI,CAACA,QAAQ,IAAIA,QAAQ,GAAG,CAAC,EAAE;IAC7B,OAAO,CAAC;EACV;EACA,IAAIA,QAAQ,GAAG,GAAG,EAAE;IAClB,OAAO,GAAG;EACZ;EACA,OAAOA,QAAQ;AACjB;AACA,OAAO,SAASC,iBAAiB,CAACC,IAAI,EAAE;EACtC,IACEC,OAAO,GAELD,IAAI,CAFNC,OAAO;IACPC,cAAc,GACZF,IAAI,CADNE,cAAc;EAEhB,IAAIC,OAAO,GAAGD,cAAc;EAC5B;EACA,IAAID,OAAO,IAAI,UAAU,IAAIA,OAAO,EAAE;IACpCG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGV,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,yEAAyE,CAAC,GAAG,KAAK,CAAC;IACtJO,OAAO,GAAGF,OAAO,CAACH,QAAQ;EAC5B;EACA,IAAIG,OAAO,IAAI,SAAS,IAAIA,OAAO,EAAE;IACnCE,OAAO,GAAGF,OAAO,CAACE,OAAO;EAC3B;EACA,OAAOA,OAAO;AAChB;AACA,O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